<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>transform居中方法</title>
	<style>
		html,body{
			margin: 0;
			padding: 0;
		}
		.box{
			width: 500px;
			/*height: 350px;*/
			background: pink;
			color: #888;
			border: 1px solid #c00;
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%,-50%);
		}
	</style>
</head>
<body>
	<div class="box">
		<div class="small">
			Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vitae alias saepe, quasi deleniti, delectus impedit? Expedita distinctio perferendis magni a, impedit iusto possimus sapiente, quia, nisi, officiis nostrum dolor eum.
		</div>
	</div>
</body>
</html>